package com.study.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.study.entities.Order;
import com.study.mapper.OrderMapper;
import com.study.service.IOrderService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {

    @Override
    public Order findOrder(Long id){
        Order order = new Order();
        order.setId(id);
        order.setTotalAmount(new BigDecimal(100));
        order.setUserId(1L);
        order.setNickName("nickName");
        order.setAddress("address");
        order.setProduceList(null);
        return order;

    }

    public Boolean createOrder(){
        Order order = new Order();
        order.setId(1L);
        order.setTotalAmount(new BigDecimal(100));
        order.setUserId(1L);
        order.setNickName("nickName");
        order.setAddress("address");
        order.setProduceList(null);
        return true;
    }
}